from qa_engine.engine import QAEngine
from server.check_resource import check_resource
import os
from const import RESOURCE_PATH

# 先检查资源是否完整
check_resource()

qa_engine = QAEngine(os.path.join(RESOURCE_PATH, 'main-engine.yml'))

while True:
    question = input('qa_engine:')
    if question == 'exit':
        break
    print(qa_engine.response(None, question))
